/**
* @Title: warning_ctrl.js
* @Description: TODO
* Copyright: Copyright (c) 2014 
 * Company:中国平安
*
* @Project HIMS-FWA
* @date 2014年10月27日 下午4:43:38
* @version V1.0
*/
;
(function(){
	'use strict';
	
	var app = angular.module('fwa.mainApp');
	app.controller('CaseAuditTellReportDialogCtrl', ['$scope','CaseCommonService','$http','$modal','BaseURL','Modal','$modalInstance','FwaTabsetService','CommunityService','$stateParams','$state',
	                                function($scope,CaseCommonService,$http,$modal,baseUrl,Modal,$modalInstance,fwaTabsetService,CommunityService,$stateParams,$state){
        
//		$scope.tellReportRead=true;
//		if($scope.typeRead){
//			$scope.tellReportRead=false;
//		}else{
//			$scope.tellReportRead=true;
//		}
//		
		
	/*	CommunityService.initDate("yyyy-MM-dd").success(function(res){
			$scope.formatDate  = res.formatDate;
		});*/
		
		
		//关闭弹窗
         $scope.onOk = function() {
             $modalInstance.dismiss();
         }
         /**
          * 下载稽核报告告知函
          */
        
	      $scope.downLoadAuditNotification=function(){
	        	 $scope.openpdf();     		        	      		
	      }
	       //打开文件
         $scope.openpdf = function (){
    	  var caseCode= $scope.caseCode;
   			var success = new PDFObject({ url:baseUrl+'auditDownFileController/downPdfFile.do?caseCode='+caseCode,
   				pdfOpenParams: { navpanes: 1,
                 toolbar: 1,
                 statusbar: 1,
                 view: 'FitV',
                 pagemode: 'thumbs'
   			}}).embed("caseAuditTellReportDialogOpenpdf");
   		  }

    
        
        $scope.$watch('$viewContentLoaded',function(){
        		$scope.openpdf(); 	
        });

	}]);
})();
